let Build = require("../build/build");
const build = new Build();
let Builder = require("../builder/SchemeBuilder");
let utils = require("../utils/utils");
const Define = require("../define");

let debug = true;

const args = process.argv;
// utils.logColor('green', args);
if (args.length > 2) {
    debug = args[2] == "true";
}

const project = Define.PROJECT;
const game = `/Users/wuhaotian/work/cocos/${project}/assets/bundles/subgame/`;
const test = "/Users/wuhaotian/work/cocos/dev_client/files/new/";
const infoName = "GameInfo.json";
const input = "/Users/wuhaotian/work/res/h5_game_config/hz_release/scheme/";
const output = game;
const output_debug = "/Users/wuhaotian/work/cocos/dev_client/files/new/";
const temp = "/Users/wuhaotian/work/cocos/dev_client/files/scheme.json";
const unable = [];
const limit = ["mengqi_acheng"];
const limit_release = Define.DIRS_LIMIT_SUBGAME;
build.run(
    debug ? test : game,
    infoName,
    input,
    debug ? output_debug : output,
    temp,
    debug ? limit : limit_release,
    unable,
    Builder
);
